<?php
namespace App\Event\MallOrder;

use App\Event\Event;
use App\Repository\UserRepository;
use App\Repository\MallGoodsRepository;

// 订单关闭事件
class StatusNoEvent extends Event
{
    public $order;
    
    // 用户及金额
    public function __construct($order)
    {
        $this->order = $order;
        
        // 用户
        $this->user = UserRepository::make($this->order->user);
        
        // 商品
        $this->goods = MallGoodsRepository::make($this->order->goods);
    }
}